<?php $data = array(
			'title' => '论文系统',
			'css' => array('css/global.css','css/login.css'),
			'js' => array('js/jquery-1.4.4.min.js','js/home.js'),
			'menu' => '03',
			'sub_menus' => array('user/user_list' => '用户管理', 'user/signup' => '创建新用户')
		);
		$this->load->view('templates/header',$data);
?>

<?php $this->load->view('templates/sub_menu');?>

<div class="main clearfix">
	<div class="real-wrap clearfix">
		<?php $this->load->view('templates/user_template');?>
		<div class="maincontent om">	
			<div id="signup_form">
			
				<p class="heading">创建新用户</p>
			
				<div class="alert" <?php if(!validation_errors()) echo 'style="display:none;"'; ?>>
			    	<button type="button" class="close" data-dismiss="alert">×</button>
			    	<?php echo validation_errors('<p class="error">','</p>'); ?>
			    </div>
			
				<?php echo form_open('user/signup/submit'); ?>
				<p>
					<label for="username">登陆名: </label>
					<?php echo form_input('account',set_value('account')); ?>
				</p>
				<p>
					<label for="password">初始密码: </label>
					<?php echo form_password('password',set_value('password', '123456')); ?>
				</p>
				<p>
					<label for="username">昵称: </label>
					<?php echo form_input('name',set_value('name')); ?>
				</p>
				<!-- <p>
					<label for="passconf">确认密码: </label>
					<?php echo form_password('passconf'); ?>
				</p> -->
				<p>
					<label for="email">E-mail: </label>
					<?php echo form_input('email',set_value('email')); ?>
				</p>
				<p>
					<label for="phone">电话: </label>
					<?php echo form_input('phone',set_value('phone')); ?>
				</p>
				<p>
					<label for="role_id">角色权限: </label>
					<select name="role_id"  multiple="multiple">
						<?php foreach ($roles as $key => $name):?>
							<option value="<?=$key?>" <?php if($key == 2) echo set_select('role_id', $key, TRUE); else echo set_select('role_id', $key); ?> ><?=$name?></option>
						<?php endforeach; ?>
					</select> 
				</p>
				<p>
					<label for="sex">性别: </label>
					<select name="sex"  multiple="multiple">
						<option value="male" <?php echo set_select('sex', 'male', TRUE); ?> >男</option>
						<option value="female" <?php echo set_select('sex', 'female'); ?> >女</option>
					</select> 
				</p>
				<p>
					<?php echo form_submit('submit','提交', "onclick='valid_submit(this);' class='btn'"); ?>
				</p>
				<?php echo form_close(); ?>
			
			</div>
		</div>
	</div>
</div>

<?php $this->load->view('templates/footer');?>
